<template lang="">
    <div class="goodsdesc_container">
        <h2>{{info.title}}</h2>
        <hr>
        <div v-html="info.content" class="content"></div>
    </div>
</template>
<script>
import axios from 'axios'
import {Toast} from 'mint-ui'
export default {
    data(){
        return{
            id:this.$route.params.id,
            info:{}//图文介绍
        }
    },
    methods:{
        getxx(){
            axios.get("api/goods/getdesc/" + this.id)
            .then((res)=>{
                if(res.data.status===0){
                    Toast("获取成功")
                    this.info=res.data.message[0]
                }
                else{
                    Toast("状态错误")
                }
            })
            .catch((res)=>{
                Toast(res)
            })
        }       
    },
    created(){
        this.getxx();
    }
}
</script>
<style lang="scss">
.goodsdesc_container{
    padding: 4px;
    h2{
        font-size: 16px;
        color: #226aff;
        text-align: center;
        margin: 15px;
    }
    .content img{
        width: 100%;
        height: auto;
    }
}
    
</style>